<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>


  function createCar(b, c, t){
    this.brand = b;
    this.color = c;
    this.type = t;
    this.run = function(){
      console.log(`${this.color}的${this.brand}跑了`);
    }
  }

  function dazhongCar(c, t){
    return new createCar("大众", c, t);
  }

  // 需求：批量创建白色大众轿车
  const c1 = new dazhongCar("白色", "轿车");
  // 需求：批量创建红色大众跑车
  const c5 = new dazhongCar("红色", "跑车");

</script>
</html>